<template>
  <div class="b1">
    我是A1--{{ names }}
   我是: {{ namelist.xm }}--{{ namelist.age }}岁
  </div>
</template>

<script>
export default {
  // 爷组件注入孙组件数据
  inject:['names','namelist']
}
</script>

<style>
.b1{
    width: 290px;
    height: 50px;
    border: 2px solid black;
    text-align: center;
    margin: 0 auto;
}
</style>